import request from '@/utils/request'

// 查询凭证列表
export function listCredential(query) {
  return request({
    url: '/finances/credential/list',
    method: 'get',
    params: query
  })
}

// 查询凭证详细
export function getCredential(id) {
  return request({
    url: '/finances/credential/' + id,
    method: 'get'
  })
}

// 新增凭证
export function addCredential(data) {
  return request({
    url: '/finances/credential',
    method: 'post',
    data: data
  })
}

// 修改凭证
export function updateCredential(data) {
  return request({
    url: '/finances/credential',
    method: 'put',
    data: data
  })
}

// 删除凭证
export function delCredential(id) {
  return request({
    url: '/finances/credential/' + id,
    method: 'delete'
  })
}
